/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package net.metashare.grah.logic

/**
 *
 * @author dsherema
 */


class Between {
  def Object start
  def Object end
  def boolean inclusive


  def Between(start, end, inclusive = true) {
    this.start = start
    this.end = end
    this.inclusive = inclusive
  }

  def boolean apply(Object object) {
    if (inclusive)
    start >= object && object <= end
    else
      start > object && object < end
  }
}